home *** CD-ROM | disk | FTP | other *** search
/ Exame Informatica 137 / Exame Informatica 137.iso / Programas / PDFTransformer2.0 / ABBYY PDF Transformer 2.0 / PDFL70.dll / PSPROCSET / 6 < prev    next >
Encoding:
Text File  |  2006-08-25  |  12.7 KB  |  668 lines

  1. %%BeginResource: procset pdf 6.0 1
  2. %%Copyright: Copyright 1998-2003 Adobe Systems Incorporated. All Rights Reserved.
  3. %%Title: General operators for PDF, common to all Language Levels.
  4. /cm { matrix astore concat } bd
  5. /d /setdash ld
  6. /f /fill ld
  7. /h /closepath ld
  8. /i {dup 0 eq {pop _defaultflatness} if setflat} bd
  9. /j /setlinejoin ld
  10. /J /setlinecap ld
  11. /M /setmiterlimit ld
  12. /n /newpath ld
  13. /S /stroke ld
  14. /w /setlinewidth ld
  15. /W /clip ld
  16. /sg /setgray ld
  17. /initgs {
  18. 0 setgray
  19. [] 0 d
  20. 0 j
  21. 0 J
  22. 10 M
  23. 1 w
  24. false setSA
  25. /_defaulttransfer load settransfer
  26. 0 i
  27. /RelativeColorimetric ri
  28. newpath
  29. } bd
  30. /int {
  31. dup 2 index sub 3 index 5 index sub div 6 -2 roll sub mul
  32. exch pop add exch pop
  33. } bd
  34. /limit {
  35. dup 2 index le { exch } if pop
  36. dup 2 index ge { exch } if pop
  37. } bd
  38. /domainClip {
  39. Domain aload pop 3 2 roll
  40. limit
  41. } [/Domain] bld
  42. /applyInterpFunc {
  43. 0 1 DimOut 1 sub
  44. {
  45. dup C0 exch get exch
  46. dup C1 exch get exch
  47. 3 1 roll
  48. 1 index sub
  49. 3 index
  50. N exp mul add
  51. exch
  52. currentdict /Range_lo known
  53. {
  54. dup Range_lo exch get exch
  55. Range_hi exch get
  56. 3 2 roll limit
  57. }
  58. {
  59. pop
  60. }
  61. ifelse
  62. exch
  63. } for
  64. pop
  65. } [/DimOut /C0 /C1 /N /Range_lo /Range_hi] bld
  66. /encodeInput {
  67. NumParts 1 sub
  68. 0 1 2 index
  69. {
  70. dup Bounds exch get
  71. 2 index gt
  72. { exit }
  73. { dup
  74. 3 index eq
  75. { exit }
  76. { pop } ifelse
  77. } ifelse
  78. } for
  79. 3 2 roll pop
  80. dup Bounds exch get exch
  81. dup 1 add Bounds exch get exch
  82. 2 mul
  83. dup Encode exch get exch
  84. 1 add Encode exch get
  85. int
  86. } [/NumParts /Bounds /Encode] bld
  87. /rangeClip {
  88. exch dup Range_lo exch get
  89. exch Range_hi exch get
  90. 3 2 roll
  91. limit
  92. } [/Range_lo /Range_hi] bld
  93. /applyStitchFunc {
  94. Functions exch get exec
  95. currentdict /Range_lo known {
  96. 0 1 DimOut 1 sub {
  97. DimOut 1 add -1 roll
  98. rangeClip
  99. } for
  100. } if
  101. } [/Functions /Range_lo /DimOut] bld
  102. /pdf_flushfilters
  103. {
  104. aload length
  105. { dup status
  106. 1 index currentfile ne and
  107. { dup flushfile closefile }
  108. { pop }
  109. ifelse
  110. } repeat
  111. } bd
  112. /pdf_readstring
  113. {
  114. 1 index dup length 1 sub get
  115. exch readstring pop
  116. exch pdf_flushfilters
  117. } bind def
  118. /pdf_dictOp
  119. {
  120. 3 2 roll
  121. 10 dict copy
  122. begin
  123. _Filters dup length 1 sub get def
  124. currentdict exch exec
  125. _Filters pdf_flushfilters
  126. end
  127. } [/_Filters] bld
  128. /pdf_imagemask {{imagemask} /DataSource pdf_dictOp} bd
  129. /pdf_shfill {{sh} /DataSource pdf_dictOp} bd
  130. /pdf_sethalftone {{sethalftone} /Thresholds pdf_dictOp} bd
  131. /masks [ 2#10000000
  132. 2#11000000
  133. 2#11100000
  134. 2#11110000
  135. 2#11111000
  136. 2#11111100
  137. 2#11111110
  138. 2#11111111 ] def
  139. /addNBits
  140. {
  141. /numBits exch def
  142. /byte exch def
  143. OutBitOffset numBits add 8 gt
  144. {
  145. byte OutBitOffset 8 sub bitshift
  146. OutBuffer OutByteIndex get or
  147. OutBuffer OutByteIndex 3 -1 roll put
  148. /OutByteIndex OutByteIndex 1 add def
  149. /bitsDoneSoFar OutBitOffset def
  150. /OutBitOffset numBits 8 OutBitOffset sub sub def
  151. OutBitOffset 0 gt
  152. {
  153. byte bitsDoneSoFar bitshift
  154. masks numBits bitsDoneSoFar sub get and
  155. OutBuffer OutByteIndex 3 -1 roll put
  156. } if
  157. }
  158. {
  159. byte masks numBits 1 sub get and
  160. OutBitOffset neg bitshift
  161. OutBuffer OutByteIndex get or
  162. OutBuffer OutByteIndex 3 -1 roll put
  163. /OutBitOffset OutBitOffset numBits add def
  164. OutBitOffset 8 eq
  165. {
  166. /OutBitOffset 0 def
  167. /OutByteIndex OutByteIndex 1 add def
  168. } if
  169. } ifelse
  170. } bind def
  171. /DevNNFilter
  172. {
  173. /InBuffer Width NumComps mul BitsPerComponent mul 7 add 8 idiv string def
  174. AllSource InBuffer readstring pop pop
  175. /outlen Width NewNumComps mul BitsPerComponent mul 7 add 8 idiv def
  176. /OutBuffer outlen string def
  177. 0 1 outlen 1 sub { OutBuffer exch 0 put } for
  178. /InByteIndex 0 def
  179. /InBitOffset 0 def
  180. /OutByteIndex 0 def
  181. /OutBitOffset 0 def
  182. /KeepArray NumComps array def
  183. 0 1 NumComps 1 sub { KeepArray exch true put } for
  184. DevNNones { KeepArray exch false put } forall
  185. Width {
  186. KeepArray
  187. {
  188. {
  189. /bitsLeft BitsPerComponent def
  190. {
  191. bitsLeft 0 le { exit } if
  192. /bitsToDo 8 InBitOffset sub dup bitsLeft gt { pop bitsLeft } if def
  193. InBuffer InByteIndex get
  194. InBitOffset bitshift
  195. bitsToDo addNBits
  196. /bitsLeft bitsLeft bitsToDo sub def
  197. InBitOffset bitsToDo add
  198. dup 8 mod /InBitOffset exch def
  199. 8 idiv InByteIndex add /InByteIndex exch def
  200. } loop
  201. }
  202. {
  203. InBitOffset BitsPerComponent add
  204. dup 8 mod /InBitOffset exch def
  205. 8 idiv InByteIndex add /InByteIndex exch def
  206. }
  207. ifelse
  208. }
  209. forall
  210. } repeat
  211. OutBuffer
  212. } bd
  213. /pdf_image
  214. {
  215. 20 dict copy
  216. begin
  217. /UnusedNones where { /UnusedNones get}{false} ifelse
  218. {
  219. /NumComps Decode length 2 div cvi def
  220. /OrigDecode Decode def
  221. /NumNones DevNNones length def
  222. /NewNumComps NumComps NumNones sub def
  223. /Decode NewNumComps 2 mul cvi array def
  224. /devNNindx 0 def
  225. /decIndx 0 def
  226. /cmpIndx 0 def
  227. NumComps {
  228. cmpIndx DevNNones devNNindx get eq
  229. {
  230. /devNNindx devNNindx 1 add dup NumNones eq {pop 0} if def
  231. }
  232. {
  233. Decode decIndx OrigDecode cmpIndx 2 mul get put
  234. Decode decIndx 1 add OrigDecode cmpIndx 2 mul 1 add get put
  235. /decIndx decIndx 2 add def
  236. } ifelse
  237. /cmpIndx cmpIndx 1 add def
  238. } repeat
  239. _Filters dup length 1 sub get /AllSource exch def
  240. /DataSource { DevNNFilter } def
  241. }
  242. { _Filters dup length 1 sub get /DataSource exch def }
  243. ifelse
  244. currentdict image
  245. _Filters pdf_flushfilters
  246. end
  247. } bd
  248. /pdf_maskedImage
  249. {
  250. 10 dict copy begin
  251. /miDict currentdict def
  252. /DataDict DataDict 10 dict copy def
  253. DataDict begin
  254. /DataSource
  255. _Filters dup length 1 sub get
  256. def
  257. miDict image
  258. _Filters pdf_flushfilters
  259. end
  260. miDict /InterleaveType get 3 eq
  261. { MaskDict /DataSource get dup type /filetype eq { closefile } { pop } ifelse }
  262. if
  263. end
  264. } [/miDict /DataDict /_Filters] bld
  265. /RadialShade {
  266. 40 dict begin
  267. /background exch def
  268. /ext1 exch def
  269. /ext0 exch def
  270. /BBox exch def
  271. /r2 exch def
  272. /c2y exch def
  273. /c2x exch def
  274. /r1 exch def
  275. /c1y exch def
  276. /c1x exch def
  277. /rampdict exch def
  278. gsave
  279. BBox length 0 gt {
  280. newpath
  281. BBox 0 get BBox 1 get moveto
  282. BBox 2 get BBox 0 get sub 0 rlineto
  283. 0 BBox 3 get BBox 1 get sub rlineto
  284. BBox 2 get BBox 0 get sub neg 0 rlineto
  285. closepath
  286. clip
  287. newpath
  288. } if
  289. c1x c2x eq
  290. {
  291. c1y c2y lt {/theta 90 def}{/theta 270 def} ifelse
  292. }
  293. {
  294. /slope c2y c1y sub c2x c1x sub div def
  295. /theta slope 1 atan def
  296. c2x c1x lt c2y c1y ge and { /theta theta 180 sub def} if
  297. c2x c1x lt c2y c1y lt and { /theta theta 180 add def} if
  298. }
  299. ifelse
  300. gsave
  301. clippath
  302. c1x c1y translate
  303. theta rotate
  304. -90 rotate
  305. { pathbbox } stopped
  306. { 0 0 0 0 } if
  307. /yMax exch def
  308. /xMax exch def
  309. /yMin exch def
  310. /xMin exch def
  311. grestore
  312. xMax xMin eq yMax yMin eq or
  313. {
  314. grestore
  315. end
  316. }
  317. {
  318. /max { 2 copy gt { pop } {exch pop} ifelse } bind def
  319. /min { 2 copy lt { pop } {exch pop} ifelse } bind def
  320. rampdict begin
  321. 40 dict begin
  322. background length 0 gt { background sssetbackground gsave clippath fill grestore } if
  323. gsave
  324. c1x c1y translate
  325. theta rotate
  326. -90 rotate
  327. /c2y c1x c2x sub dup mul c1y c2y sub dup mul add sqrt def
  328. /c1y 0 def
  329. /c1x 0 def
  330. /c2x 0 def
  331. ext0 {
  332. 0 getrampcolor
  333. c2y r2 add r1 sub 0.0001 lt
  334. {
  335. c1x c1y r1 360 0 arcn
  336. pathbbox
  337. /aymax exch def
  338. /axmax exch def
  339. /aymin exch def
  340. /axmin exch def
  341. /bxMin xMin axmin min def
  342. /byMin yMin aymin min def
  343. /bxMax xMax axmax max def
  344. /byMax yMax aymax max def
  345. bxMin byMin moveto
  346. bxMax byMin lineto
  347. bxMax byMax lineto
  348. bxMin byMax lineto
  349. bxMin byMin lineto
  350. eofill
  351. }
  352. {
  353. c2y r1 add r2 le
  354. {
  355. c1x c1y r1 0 360 arc
  356. fill
  357. }
  358. {
  359. c2x c2y r2 0 360 arc fill
  360. r1 r2 eq
  361. {
  362. /p1x r1 neg def
  363. /p1y c1y def
  364. /p2x r1 def
  365. /p2y c1y def
  366. p1x p1y moveto p2x p2y lineto p2x yMin lineto p1x yMin lineto
  367. fill
  368. }
  369. {
  370. /AA r2 r1 sub c2y div def
  371. AA -1 eq
  372. { /theta 89.99 def}
  373. { /theta AA 1 AA dup mul sub sqrt div 1 atan def}
  374. ifelse
  375. /SS1 90 theta add dup sin exch cos div def
  376. /p1x r1 SS1 SS1 mul SS1 SS1 mul 1 add div sqrt mul neg def
  377. /p1y p1x SS1 div neg def
  378. /SS2 90 theta sub dup sin exch cos div def
  379. /p2x r1 SS2 SS2 mul SS2 SS2 mul 1 add div sqrt mul def
  380. /p2y p2x SS2 div neg def
  381. r1 r2 gt
  382. {
  383. /L1maxX p1x yMin p1y sub SS1 div add def
  384. /L2maxX p2x yMin p2y sub SS2 div add def
  385. }
  386. {
  387. /L1maxX 0 def
  388. /L2maxX 0 def
  389. }ifelse
  390. p1x p1y moveto p2x p2y lineto L2maxX L2maxX p2x sub SS2 mul p2y add lineto
  391. L1maxX L1maxX p1x sub SS1 mul p1y add lineto
  392. fill
  393. }
  394. ifelse
  395. }
  396. ifelse
  397. } ifelse
  398. } if
  399. c1x c2x sub dup mul
  400. c1y c2y sub dup mul
  401. add 0.5 exp
  402. 0 dtransform
  403. dup mul exch dup mul add 0.5 exp 72 div
  404. 0 72 matrix defaultmatrix dtransform dup mul exch dup mul add sqrt
  405. 72 0 matrix defaultmatrix dtransform dup mul exch dup mul add sqrt
  406. 1 index 1 index lt { exch } if pop
  407. /hires exch def
  408. hires mul
  409. /numpix exch def
  410. /numsteps NumSamples def
  411. /rampIndxInc 1 def
  412. /subsampling false def
  413. numpix 0 ne
  414. {
  415. NumSamples numpix div 0.5 gt
  416. {
  417. /numsteps numpix 2 div round cvi dup 1 le { pop 2 } if def
  418. /rampIndxInc NumSamples 1 sub numsteps div def
  419. /subsampling true def
  420. } if
  421. } if
  422. /xInc c2x c1x sub numsteps div def
  423. /yInc c2y c1y sub numsteps div def
  424. /rInc r2 r1 sub numsteps div def
  425. /cx c1x def
  426. /cy c1y def
  427. /radius r1 def
  428. newpath
  429. xInc 0 eq yInc 0 eq rInc 0 eq and and
  430. {
  431. 0 getrampcolor
  432. cx cy radius 0 360 arc
  433. stroke
  434. NumSamples 1 sub getrampcolor
  435. cx cy radius 72 hires div add 0 360 arc
  436. 0 setlinewidth
  437. stroke
  438. }
  439. {
  440. 0
  441. numsteps
  442. {
  443. dup
  444. subsampling { round } if
  445. getrampcolor
  446. cx cy radius 0 360 arc
  447. /cx cx xInc add def
  448. /cy cy yInc add def
  449. /radius radius rInc add def
  450. cx cy radius 360 0 arcn
  451. eofill
  452. rampIndxInc add
  453. }
  454. repeat
  455. pop
  456. } ifelse
  457. ext1 {
  458. c2y r2 add r1 lt
  459. {
  460. c2x c2y r2 0 360 arc
  461. fill
  462. }
  463. {
  464. c2y r1 add r2 sub 0.0001 le
  465. {
  466. c2x c2y r2 360 0 arcn
  467. pathbbox
  468. /aymax exch def
  469. /axmax exch def
  470. /aymin exch def
  471. /axmin exch def
  472. /bxMin xMin axmin min def
  473. /byMin yMin aymin min def
  474. /bxMax xMax axmax max def
  475. /byMax yMax aymax max def
  476. bxMin byMin moveto
  477. bxMax byMin lineto
  478. bxMax byMax lineto
  479. bxMin byMax lineto
  480. bxMin byMin lineto
  481. eofill
  482. }
  483. {
  484. c2x c2y r2 0 360 arc fill
  485. r1 r2 eq
  486. {
  487. /p1x r2 neg def
  488. /p1y c2y def
  489. /p2x r2 def
  490. /p2y c2y def
  491. p1x p1y moveto p2x p2y lineto p2x yMax lineto p1x yMax lineto
  492. fill
  493. }
  494. {
  495. /AA r2 r1 sub c2y div def
  496. AA -1 eq
  497. { /theta 89.99 def}
  498. { /theta AA 1 AA dup mul sub sqrt div 1 atan def}
  499. ifelse
  500. /SS1 90 theta add dup sin exch cos div def
  501. /p1x r2 SS1 SS1 mul SS1 SS1 mul 1 add div sqrt mul neg def
  502. /p1y c2y p1x SS1 div sub def
  503. /SS2 90 theta sub dup sin exch cos div def
  504. /p2x r2 SS2 SS2 mul SS2 SS2 mul 1 add div sqrt mul def
  505. /p2y c2y p2x SS2 div sub def
  506. r1 r2 lt
  507. {
  508. /L1maxX p1x yMax p1y sub SS1 div add def
  509. /L2maxX p2x yMax p2y sub SS2 div add def
  510. }
  511. {
  512. /L1maxX 0 def
  513. /L2maxX 0 def
  514. }ifelse
  515. p1x p1y moveto p2x p2y lineto L2maxX L2maxX p2x sub SS2 mul p2y add lineto
  516. L1maxX L1maxX p1x sub SS1 mul p1y add lineto
  517. fill
  518. }
  519. ifelse
  520. }
  521. ifelse
  522. } ifelse
  523. } if
  524. grestore
  525. grestore
  526. end
  527. end
  528. end
  529. } ifelse
  530. } bd
  531. /GenStrips {
  532. 40 dict begin
  533. /background exch def
  534. /ext1 exch def
  535. /ext0 exch def
  536. /BBox exch def
  537. /y2 exch def
  538. /x2 exch def
  539. /y1 exch def
  540. /x1 exch def
  541. /rampdict exch def
  542. gsave
  543. BBox length 0 gt {
  544. newpath
  545. BBox 0 get BBox 1 get moveto
  546. BBox 2 get BBox 0 get sub 0 rlineto
  547. 0 BBox 3 get BBox 1 get sub rlineto
  548. BBox 2 get BBox 0 get sub neg 0 rlineto
  549. closepath
  550. clip
  551. newpath
  552. } if
  553. x1 x2 eq
  554. {
  555. y1 y2 lt {/theta 90 def}{/theta 270 def} ifelse
  556. }
  557. {
  558. /slope y2 y1 sub x2 x1 sub div def
  559. /theta slope 1 atan def
  560. x2 x1 lt y2 y1 ge and { /theta theta 180 sub def} if
  561. x2 x1 lt y2 y1 lt and { /theta theta 180 add def} if
  562. }
  563. ifelse
  564. gsave
  565. clippath
  566. x1 y1 translate
  567. theta rotate
  568. { pathbbox } stopped
  569. { 0 0 0 0 } if
  570. /yMax exch def
  571. /xMax exch def
  572. /yMin exch def
  573. /xMin exch def
  574. grestore
  575. xMax xMin eq yMax yMin eq or
  576. {
  577. grestore
  578. end
  579. }
  580. {
  581. rampdict begin
  582. 20 dict begin
  583. background length 0 gt { background sssetbackground gsave clippath fill grestore } if
  584. gsave
  585. x1 y1 translate
  586. theta rotate
  587. /xStart 0 def
  588. /xEnd x2 x1 sub dup mul y2 y1 sub dup mul add 0.5 exp def
  589. /ySpan yMax yMin sub def
  590. /numsteps NumSamples def
  591. /rampIndxInc 1 def
  592. /subsampling false def
  593. xStart 0 transform
  594. xEnd 0 transform
  595. 3 -1 roll
  596. sub dup mul
  597. 3 1 roll
  598. sub dup mul
  599. add 0.5 exp 72 div
  600. 0 72 matrix defaultmatrix dtransform dup mul exch dup mul add sqrt
  601. 72 0 matrix defaultmatrix dtransform dup mul exch dup mul add sqrt
  602. 1 index 1 index lt { exch } if pop
  603. mul
  604. /numpix exch def
  605. numpix 0 ne
  606. {
  607. NumSamples numpix div 0.5 gt
  608. {
  609. /numsteps numpix 2 div round cvi dup 1 le { pop 2 } if def
  610. /rampIndxInc NumSamples 1 sub numsteps div def
  611. /subsampling true def
  612. } if
  613. } if
  614. ext0 {
  615. 0 getrampcolor
  616. xMin xStart lt
  617. { xMin yMin xMin neg ySpan rectfill } if
  618. } if
  619. /xInc xEnd xStart sub numsteps div def
  620. /x xStart def
  621. 0
  622. numsteps
  623. {
  624. dup
  625. subsampling { round } if
  626. getrampcolor
  627. x yMin xInc ySpan rectfill
  628. /x x xInc add def
  629. rampIndxInc add
  630. }
  631. repeat
  632. pop
  633. ext1 {
  634. xMax xEnd gt
  635. { xEnd yMin xMax xEnd sub ySpan rectfill } if
  636. } if
  637. grestore
  638. grestore
  639. end
  640. end
  641. end
  642. } ifelse
  643. } bd
  644. /currentdistillerparams where { pop currentdistillerparams /CoreDistVersion get 5000 lt}{true}ifelse
  645. {
  646. /PDFMark5 {cleartomark} bd
  647. }
  648. {
  649. /PDFMark5 {pdfmark} bd
  650. }ifelse
  651. /ReadByPDFMark5
  652. {
  653. 2 dict begin
  654. /makerString exch def string /tmpString exch def
  655. {
  656. currentfile tmpString readline pop
  657. makerString anchorsearch
  658. {
  659. pop pop cleartomark exit
  660. }
  661. {
  662. 3 copy /PUT PDFMark5 pop 2 copy (\n) /PUT PDFMark5
  663. } ifelse
  664. }loop
  665. end
  666. }bd
  667. %%EndResource
  668.